Maker = class()

function Maker:init()
    self.mColor = color(0, 0, 0, 0)
    self.backshow = false
    self.Yset = {Yset = 0}
    self.back = TextButton(40,HEIGHT - 30 ,LP.back)
    self.back:setFont("HelveticaNeue-Light",30)
    self.back.clicked = function() 
        self.backshow = false
        tween(0.3,self.mColor,{a = 0},tween.easing.linear,function() self.showing = false end)    
    end
    self.back.textColor = color(255, 255, 255, 255)
end

function Maker:show()
    self.showing = true
    self.backshow = true
    tween(0.3,self.mColor,{a = 190},tween.easing.linear,function()
        tween(60,self.Yset,{Yset = HEIGHT*4.5} ,{easing = tween.easing.linear,loop =  tween.loop.forever})
    end)
end

function Maker:draw()
    pushStyle()
    pushMatrix()
    noStroke()
    rectMode(CORNER)
    fill(self.mColor)
    rect(-10,-10,WIDTH+20,HEIGHT+20) 
    popMatrix()
    popStyle()
    if self.backshow == true then
        self.back:draw()
        self:inside()
    end
end

function Maker:inside()
    font("ArialMT")
    fontSize(100)
    fill(255, 255, 255, 255)
    pushStyle()
    textMode(CENTER)
    pushMatrix()
    translate(0,self.Yset.Yset)
    sprite("Project:Icon",WIDTH/2,-50,300,300)    
    text("PhysicsBox",WIDTH/2,-250)
    
    sprite("Cargo Bot:Codea Icon",WIDTH/2,-500,300,300)
    text(LP.makesoftware,WIDTH/2,-650)
    fontSize(50)
    text(LP.maker,WIDTH/2,-740)
    text(LP.dt,WIDTH/2,-800)
    text(LP.bk,WIDTH/2,-860)
    text(LP.art,WIDTH/2,-920)
    text(LP.my,WIDTH/2,-980)
    text(LP.sw,WIDTH/2,-1040)
    sprite("Project:TC Studio L1",WIDTH/2,-1200,200,200)
    fontSize(100)
    text("2015,TC Studio",WIDTH/2,-1350)
    text("All Rights Reserved",WIDTH/2,-1460)
    popMatrix()
    popStyle()
end

function Maker:touched(touch)
    self.back:touched(touch)
end
